AuthController = function(request, result) {
	BaseController.call(this, request, result);

	/**
	 * Authenticate Action - is executed by default if no other action is specified
	 */
	this.authenticateAction = function() {
	    var AuthAdapter = require('./../lib/Auth/AuthAdapter/Redis.js');
	    var nohmClient = require('nohm').Nohm;
	    nohmClient.setPrefix('battlemages');
	    
	    var ad = new AuthAdapter({nohmClient: nohmClient});
	    
	    ad.authenticate("luggi", "pass", function(userIds, err){
	      if(err){
	        result.send(err[0]);
	      }else{
	        result.send(userIds[0]);
	      }
	    });
			
	};
};

exports.controller = AuthController;